package com.example.flowabledemo.data.mapper;

import com.example.flowabledemo.data.entity.AaProcess;
import com.example.flowabledemo.data.vo.AapprovalHistoryVo;
import com.example.flowabledemo.data.vo.ProcessVo;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * @author linke
 * @date 2020/11/30 23:40
 * @description
 */
public interface AaProcessMapper {

  int deleteByPrimaryKey(Integer id);

  int insertSelective(AaProcess record);

  AaProcess selectByPrimaryKey(Integer id);

  int updateByPrimaryKeySelective(AaProcess record);

  List<ProcessVo> getProcess(@Param("status") String status, @Param("username") String username);

  void updateStatus(@Param("processInstanceId") String processInstanceId, @Param("processStatus") String processStatus);

  List<ProcessVo> getApproval(@Param("status") String status, @Param("handleGroup") String handleGroup,
      @Param("handleUser") String handleUser);

  List<AapprovalHistoryVo> getApprovalHistory(@Param("status") String status, @Param("handleGroup") String handleGroup,
      @Param("handleUser") String handleUser);

  AaProcess get(@Param("processInstanceId") String processInstanceId);

  int getRunProcessNumber(@Param("username") String username, @Param("processType") String processType);

}
